3.23 \(\int \frac{x^2 \left (A+B x+C x^2\right )}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=270 \[ \frac{\left (-\frac{A b c-C \left (b^2-2 a c\right )}{\sqrt{b^2-4 a c}}+A c-b C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (\frac{2 a c C+A b c+b^2 (-C)}{\sqrt{b^2-4 a c}}+A c-b C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} c^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{b B \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c}+\frac{C x}{c} \]

[Out]

(C*x)/c + ((A*c - b*C - (A*b*c - (b^2 - 2*a*c)*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqr
t[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b - Sqrt[b^2
 - 4*a*c]]) + ((A*c - b*C + (A*b*c - b^2*C + 2*a*c*C)/Sqrt[b^2 - 4*a*c])*ArcTan[
(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b + Sqrt
[b^2 - 4*a*c]]) + (b*B*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c*Sqrt[b^2 -
 4*a*c]) + (B*Log[a + b*x^2 + c*x^4])/(4*c)

_______________________________________________________________________________________

Rubi [A]  time = 1.89827, antiderivative size = 270, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 10, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.357 \[ \frac{\left (-\frac{A b c-C \left (b^2-2 a c\right )}{\sqrt{b^2-4 a c}}+A c-b C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{2} c^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\left (\frac{2 a c C+A b c+b^2 (-C)}{\sqrt{b^2-4 a c}}+A c-b C\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{2} c^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{b B \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c}+\frac{C x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(x^2*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(C*x)/c + ((A*c - b*C - (A*b*c - (b^2 - 2*a*c)*C)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqr
t[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b - Sqrt[b^2
 - 4*a*c]]) + ((A*c - b*C + (A*b*c - b^2*C + 2*a*c*C)/Sqrt[b^2 - 4*a*c])*ArcTan[
(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b + Sqrt
[b^2 - 4*a*c]]) + (b*B*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c*Sqrt[b^2 -
 4*a*c]) + (B*Log[a + b*x^2 + c*x^4])/(4*c)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 104.165, size = 274, normalized size = 1.01 \[ \frac{B b \operatorname{atanh}{\left (\frac{b + 2 c x^{2}}{\sqrt{- 4 a c + b^{2}}} \right )}}{2 c \sqrt{- 4 a c + b^{2}}} + \frac{B \log{\left (a + b x^{2} + c x^{4} \right )}}{4 c} + \frac{C x}{c} + \frac{\sqrt{2} \left (2 C a c + b \left (A c - C b\right ) + \left (A c - C b\right ) \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{3}{2}} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} - \frac{\sqrt{2} \left (2 C a c + b \left (A c - C b\right ) - \left (A c - C b\right ) \sqrt{- 4 a c + b^{2}}\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{3}{2}} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2*(C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

B*b*atanh((b + 2*c*x**2)/sqrt(-4*a*c + b**2))/(2*c*sqrt(-4*a*c + b**2)) + B*log(
a + b*x**2 + c*x**4)/(4*c) + C*x/c + sqrt(2)*(2*C*a*c + b*(A*c - C*b) + (A*c - C
*b)*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(b + sqrt(-4*a*c + b**2)))/(
2*c**(3/2)*sqrt(b + sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2)) - sqrt(2)*(2*C*a*c
 + b*(A*c - C*b) - (A*c - C*b)*sqrt(-4*a*c + b**2))*atan(sqrt(2)*sqrt(c)*x/sqrt(
b - sqrt(-4*a*c + b**2)))/(2*c**(3/2)*sqrt(b - sqrt(-4*a*c + b**2))*sqrt(-4*a*c
+ b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.764186, size = 360, normalized size = 1.33 \[ \frac{-\frac{2 \sqrt{2} \left (A c \left (b-\sqrt{b^2-4 a c}\right )+C \left (b \sqrt{b^2-4 a c}+2 a c-b^2\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{2 \sqrt{2} \left (C \left (b \sqrt{b^2-4 a c}-2 a c+b^2\right )-A c \left (\sqrt{b^2-4 a c}+b\right )\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{B \sqrt{c} \left (\sqrt{b^2-4 a c}-b\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{\sqrt{b^2-4 a c}}+\frac{B \sqrt{c} \left (\sqrt{b^2-4 a c}+b\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\sqrt{b^2-4 a c}}+4 \sqrt{c} C x}{4 c^{3/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(x^2*(A + B*x + C*x^2))/(a + b*x^2 + c*x^4),x]

[Out]

(4*Sqrt[c]*C*x - (2*Sqrt[2]*(A*c*(b - Sqrt[b^2 - 4*a*c]) + (-b^2 + 2*a*c + b*Sqr
t[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (2*Sqrt[2]*(-(A*c*(b + Sqrt[b^2 -
4*a*c])) + (b^2 - 2*a*c + b*Sqrt[b^2 - 4*a*c])*C)*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqr
t[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + (B*
Sqrt[c]*(-b + Sqrt[b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*x^2])/Sqrt[b^2
 - 4*a*c] + (B*Sqrt[c]*(b + Sqrt[b^2 - 4*a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x
^2])/Sqrt[b^2 - 4*a*c])/(4*c^(3/2))

_______________________________________________________________________________________

Maple [B]  time = 0.05, size = 1327, normalized size = 4.9 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2*(C*x^2+B*x+A)/(c*x^4+b*x^2+a),x)

[Out]

C*x/c-1/4/c/(4*a*c-b^2)*B*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*b*(-4*a*c+b^2)^(1/2)+
1/(4*a*c-b^2)*B*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*a-1/4/c/(4*a*c-b^2)*B*ln(2*c*x^
2+(-4*a*c+b^2)^(1/2)+b)*b^2-1/2/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(
1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A*b*(-4*a*c+b^2)^(1/2)
+2*c/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b
+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A*a-1/2/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2
))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*A*b^2+1/4/c/(4*
a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c
+b^2)^(1/2))*c)^(1/2))*C*(-4*a*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/4/c/(4*a*c-b^2)*2^(1/
2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2)
)*c)^(1/2))*C*(-4*a*c+b^2)*b-1/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(
1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*C*(-4*a*c+b^2)^(1/2)
*a+1/2/c/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/
2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*C*(-4*a*c+b^2)^(1/2)*b^2+1/(4*a*c-b^2)*2^(
1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/
2))*c)^(1/2))*b*C*a-1/4/c/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*
arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*b^3*C

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{C x}{c} + \frac{\int \frac{B c x^{3} -{\left (C b - A c\right )} x^{2} - C a}{c x^{4} + b x^{2} + a}\,{d x}}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^2/(c*x^4 + b*x^2 + a),x, algorithm="maxima")

[Out]

C*x/c + integrate((B*c*x^3 - (C*b - A*c)*x^2 - C*a)/(c*x^4 + b*x^2 + a), x)/c

_______________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^2/(c*x^4 + b*x^2 + a),x, algorithm="fricas")

[Out]

Exception raised: NotImplementedError

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2*(C*x**2+B*x+A)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 1.43851, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*x^2/(c*x^4 + b*x^2 + a),x, algorithm="giac")

[Out]

Done